<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>

<@head>
<link rel="stylesheet" href="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.css"/>
</@head>
<@body>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/moment.min.js"></script>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/misc/app/js/smslog.js"></script>
</@body>
<@layout_default>
<div class="box">
    <div class="box-header with-border">
        <span class="pull-right text-muted">共 ${optlogHistory.resultTotal} 条记录</span>
        <form name="form_query" class="form-inline" action="/optlog">
            <input type="hidden" name="timeLimitStart" value="${timeLimitStart!}"/>
            <input type="hidden" name="timeLimitEnd" value="${timeLimitEnd!}"/>
            <div class="input-group">
                <div class="input-group-addon">操作时间</div>
                <input type="text" class="form-control" id="timelimitstart_and_timelimitstart" style="width: 200px"/>
            </div>
            <button type="submit" class="btn btn-warning"><i class="fa fa-search"></i> 查询</button>
        </form>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="table table-striped table-hover">
            <tr>
                <th>操作人</th>
                <th>操作时间</th>
                <th>事件</th>
            </tr>
            <#if (optlogHistory.result?size > 0)>
                <#list optlogHistory.result as item>
                    <tr>
                        <td>${item.staffAccount!}</td>
                        <td>${item.time?number_to_datetime?string("yyyy-MM-dd HH:mm:ss")}</td>
                        <td>${item.event}</td>
                    </tr>
                </#list>
            <#else>
                <tr>
                    <td class="text-center text-muted" colspan="3"><i class="fa fa-info-circle"></i> 没有记录</td>
                </tr>
            </#if>
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-center">
        <@components.pagination "/optlog?timeLimitStart=${timeLimitStart!}&timeLimitEnd=${timeLimitEnd!}&page=$page",optlogHistory.page,optlogHistory.pageTotal/>
    </div>
</div>

</@layout_default>